<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/7
 * Time: 21:03
 */

namespace App;


use Illuminate\Database\Eloquent\Model;

class Department extends Model
{
    /**
     * 关联到模型的数据表
     *
     * @var string
     */
    protected $table = 'fz_department';
    public static function get_department_type($type){
        return $type==0?'管理部门':"领用部门";
    }
    public static function getDepartmentById($id){
        $department=Department::find($id);
        return $department->department_name;
    }
}